home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news3.noc.netcom.net!zdc!zippo!usenet
- From: Jim McFarland <jgm6@orkand.em.cdc.gov>
- Subject: Re: void pointers
- Content-Type: text/plain; charset=us-ascii
- Sender: usenet@news.zippo.com
- Content-Transfer-Encoding: 7bit
- Nntp-Posting-Host: 158.111.166.77
- Organization: The Orkand Corporation
- Message-ID: <DKx55F.1D4@news.zippo.com>
- References: <Pine.SUN.3.91.960105113409.18158A-100000@phoenix.acms.arizona.edu>
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
- Mime-Version: 1.0
- Date: Tue, 9 Jan 1996 14:48:51 GMT
-
- Kenton White <jwhite@phoenix.acms.arizona.edu> wrote:
- >
- >
- >I am trying to create a class that stores pointers to other classes in an
- >array of void pointers. Since void pointers cannot be dereferenced, is
- >there any way to cast the void pointer to a non-void pointer and then
- >dereference?
- >
-
- Since you are trying to create a container class, what you need to do is
- to use polmorphism and avoid using void pointers all together.
-
-